package com.antdesignbackend.backend.service;
import com.antdesignbackend.backend.entity.entityVo.AppointmentVo;
import com.antdesignbackend.backend.entity.Appointment;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;

public interface IAppointmentService extends IService<Appointment> {
    List<AppointmentVo> search(@Param(Constants.WRAPPER) QueryWrapper<AppointmentVo> queryWrapper, Page<AppointmentVo> page);
    List<AppointmentVo> searchs(@Param(Constants.WRAPPER) QueryWrapper<AppointmentVo> queryWrapper);
    Integer count(@Param(Constants.WRAPPER) QueryWrapper<AppointmentVo> queryWrapper);
    AppointmentVo total(@Param(Constants.WRAPPER) QueryWrapper<AppointmentVo> queryWrapper);
    /**
     * 检查当前房间时间段是否可以预约
     * @param roomId
     * @param startTime
     * @param endTime
     * @return
     */
    Boolean IsAppointment(Integer roomId, String startTime, String endTime);
    Boolean IsAppoint(Integer roomId, String startTime, String endTime);
    /**
     * 增加预约
     * @param roomId
     * @param startTime
     * @param endTime
     * @param startTime
     * @param startTime
     * @return
     */
    Boolean AddAppointment(AppointmentVo vo);
    Boolean peoAddAppointment(AppointmentVo vo);
}
